TARGETNAME	= alookup

SOURCES		= alookup.c lookuputils.c

OBJS		= $(SOURCES:.c=.o)

CFLAGS          = -g -Wall -D_GNU_SOURCE
INCLUDES        = -I.
LDFLAGS         = -L.
LIBS		= -lanl

all: $(TARGETNAME)

clean:
	rm -f $(OBJS) $(TARGETNAME) 
	rm -f $(TARGETNAME)_client

$(TARGETNAME): $(OBJS)
	$(CC) $(LDFLAGS) -o $(TARGETNAME) $(OBJS) $(LIBS)
	ln -s $(TARGETNAME) $(TARGETNAME)_client

.c:
	$(CC) $(CFLAGS) $(INCLUDES) -c $<
